﻿<Window x:Class="Tech4WPF_TestApp.ChartControlTest"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:cc="clr-namespace:Tech4WPF.ChartControl;assembly=Tech4WPF"
        Title="Tech4WPF ChartControlTest" Height="533" Width="863" xmlns:my="clr-namespace:Tech4WPF.GaugeControl;assembly=Tech4WPF">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="70*" />
            <ColumnDefinition Width="30*" />
            <ColumnDefinition Width="30*" />
        </Grid.ColumnDefinitions>
        <cc:ChartControl x:Name="chartControl" Title="Sine and Cosine Chart" XLabel="x" YLabel="y" GridlinePattern="Dot" 
            XMin="0" XMax="10" XTick="1" YMin="-1.5" YMax="1.5" YTick="0.5" Grid.Row="0" Margin="10" />
        <Grid Grid.Column="1" Margin="5">
            <Grid.RowDefinitions>
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="50*" />
                <ColumnDefinition Width="50*" />
            </Grid.ColumnDefinitions>
            <TextBlock Text="Title:" VerticalAlignment="Center" Grid.Row="0" Grid.Column="0"/>
            <TextBox Text="{Binding ElementName=chartControl, Path=Title}" VerticalAlignment="Center" Grid.Row="0" Grid.Column="1" />

            <TextBlock Text="XLabel:" VerticalAlignment="Center" Grid.Row="1" Grid.Column="0"/>
            <TextBox Text="{Binding ElementName=chartControl, Path=XLabel}" VerticalAlignment="Center" Grid.Row="1" Grid.Column="1" />

            <TextBlock Text="YLabel:" VerticalAlignment="Center" Grid.Row="2" Grid.Column="0"/>
            <TextBox Text="{Binding ElementName=chartControl, Path=YLabel}" VerticalAlignment="Center" Grid.Row="2" Grid.Column="1" />

            <TextBlock Text="XMin:" VerticalAlignment="Center" Grid.Row="3" Grid.Column="0"/>
            <TextBox Text="{Binding ElementName=chartControl, Path=XMin}" VerticalAlignment="Center" Grid.Row="3" Grid.Column="1" />

            <TextBlock Text="XMax:" VerticalAlignment="Center" Grid.Row="4" Grid.Column="0"/>
            <TextBox Text="{Binding ElementName=chartControl, Path=XMax}" VerticalAlignment="Center" Grid.Row="4" Grid.Column="1" />

            <TextBlock Text="YMin:" VerticalAlignment="Center" Grid.Row="5" Grid.Column="0"/>
            <TextBox Text="{Binding ElementName=chartControl, Path=YMin}" VerticalAlignment="Center" Grid.Row="5" Grid.Column="1" />

            <TextBlock Text="YMax:" VerticalAlignment="Center" Grid.Row="6" Grid.Column="0"/>
            <TextBox Text="{Binding ElementName=chartControl, Path=YMax}" VerticalAlignment="Center" Grid.Row="6" Grid.Column="1" />

            <TextBlock Text="XTick:" VerticalAlignment="Center" Grid.Row="7" Grid.Column="0"/>
            <TextBox Text="{Binding ElementName=chartControl, Path=XTick}" VerticalAlignment="Center" Grid.Row="7" Grid.Column="1" />

            <TextBlock Text="YTick:" VerticalAlignment="Center" Grid.Row="8" Grid.Column="0"/>
            <TextBox Text="{Binding ElementName=chartControl, Path=YTick}" VerticalAlignment="Center" Grid.Row="8" Grid.Column="1" />

            <TextBlock Text="GridlinePattern:" VerticalAlignment="Center" Grid.Row="9" Grid.Column="0"/>
            <ComboBox x:Name="cbxGridlinePattern" SelectedItem="{Binding ElementName=chartControl, Path=GridlinePattern}" VerticalAlignment="Center" Grid.Row="9" Grid.Column="1" />

            <TextBlock Text="LegendPosition:" VerticalAlignment="Center" Grid.Row="10" Grid.Column="0"/>
            <ComboBox x:Name="cbxLegendPosition" SelectedItem="{Binding ElementName=chartControl, Path=LegendPosition}" VerticalAlignment="Center" Grid.Row="10" Grid.Column="1" />

            <CheckBox IsChecked="{Binding ElementName=chartControl, Path=IsLegend}" VerticalAlignment="Center" Grid.Row="11" Content="IsLegend" Grid.Column="0"/>
            <Button Content="GridlineColor" Margin="5,0" VerticalAlignment="Center" Grid.Row="11" Grid.Column="1" Click="btnGridLineColorOnClick" />

            <CheckBox IsChecked="{Binding ElementName=chartControl, Path=IsXGrid}" Content="IsXGrid" Grid.Column="0" Grid.Row="12" VerticalAlignment="Center"/>
            <CheckBox IsChecked="{Binding ElementName=chartControl, Path=IsYGrid}" Content="IsYGrid" Grid.Column="1" Grid.Row="12" VerticalAlignment="Center"/>
        </Grid>
        <Grid Grid.Column="2" Margin="5">
            <Grid.RowDefinitions>
                <RowDefinition Height="45*"/>
                <RowDefinition Height="45*"/>
                <RowDefinition Height="10*"/>
            </Grid.RowDefinitions>
            <GroupBox Header="Sine" Grid.Row="0">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="50*"/>
                        <ColumnDefinition Width="50*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                    </Grid.RowDefinitions>
                    <TextBlock Text="Name:" VerticalAlignment="Center" Grid.Row="0" Grid.Column="0"/>
                    <TextBox x:Name="tbxSineName" VerticalAlignment="Center" Grid.Row="0" Grid.Column="1" />

                    <TextBlock Text="DrawType:" VerticalAlignment="Center" Grid.Row="1" Grid.Column="0"/>
                    <ComboBox x:Name="cbxSineDrawType" VerticalAlignment="Center" Grid.Row="1" Grid.Column="1" />

                    <TextBlock Text="SymbolType:" VerticalAlignment="Center" Grid.Row="2" Grid.Column="0"/>
                    <ComboBox x:Name="cbxSineSymbolType" VerticalAlignment="Center" Grid.Row="2" Grid.Column="1" />

                    <TextBlock Text="StrokePattern:" VerticalAlignment="Center" Grid.Row="3" Grid.Column="0"/>
                    <ComboBox x:Name="cbxSineStrokePattern" VerticalAlignment="Center" Grid.Row="3" Grid.Column="1" />

                    <WrapPanel Grid.Row="4" Grid.Column="0" VerticalAlignment="Center" ClipToBounds="True">
                        <TextBlock Text="Thickness:"/>
                        <TextBox Margin="5,0" x:Name="tbxSineThickness"/>
                    </WrapPanel>

                    <WrapPanel Grid.Row="4" Grid.Column="1" VerticalAlignment="Center" ClipToBounds="True">
                        <TextBlock Text="Sym.Size:"/>
                        <TextBox Margin="5,0" x:Name="tbxSineSymbolSize"/>
                    </WrapPanel>

                    <Button Content="Stroke" Margin="5,0" VerticalAlignment="Center" Grid.Row="5" Grid.Column="0" Click="btnSineStrokeOnClick" />
                    <Button Content="Fill" Margin="5,0" VerticalAlignment="Center" Grid.Row="5" Grid.Column="1" Click="btnSineFillOnClick" />
                </Grid>
            </GroupBox>
                
            <GroupBox Header="Cosine" Grid.Row="1">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="50*"/>
                        <ColumnDefinition Width="50*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                    </Grid.RowDefinitions>
                    <TextBlock Text="Name:" VerticalAlignment="Center" Grid.Row="0" Grid.Column="0"/>
                    <TextBox x:Name="tbxCosineName" VerticalAlignment="Center" Grid.Row="0" Grid.Column="1" />

                    <TextBlock Text="DrawType:" VerticalAlignment="Center" Grid.Row="1" Grid.Column="0"/>
                    <ComboBox x:Name="cbxCosineDrawType" VerticalAlignment="Center" Grid.Row="1" Grid.Column="1" />

                    <TextBlock Text="SymbolType:" VerticalAlignment="Center" Grid.Row="2" Grid.Column="0"/>
                    <ComboBox x:Name="cbxCosineSymbolType" VerticalAlignment="Center" Grid.Row="2" Grid.Column="1" />

                    <TextBlock Text="StrokePattern:" VerticalAlignment="Center" Grid.Row="3" Grid.Column="0"/>
                    <ComboBox x:Name="cbxCosineStrokePattern" VerticalAlignment="Center" Grid.Row="3" Grid.Column="1" />

                    <WrapPanel Grid.Row="4" Grid.Column="0" VerticalAlignment="Center" ClipToBounds="True">
                        <TextBlock Text="Thickness:"/>
                        <TextBox Margin="5,0" x:Name="tbxCosineThickness"/>
                    </WrapPanel>

                    <WrapPanel Grid.Row="4" Grid.Column="1" VerticalAlignment="Center" ClipToBounds="True">
                        <TextBlock Text="Sym.Size:"/>
                        <TextBox Margin="5,0" x:Name="tbxCosineSymbolSize"/>
                    </WrapPanel>

                    <Button Content="Stroke" Margin="5,0" VerticalAlignment="Center" Grid.Row="5" Grid.Column="0" Click="btnCosineStrokeOnClick" />
                    <Button Content="Fill" Margin="5,0" VerticalAlignment="Center" Grid.Row="5" Grid.Column="1" Click="btnCosineFillOnClick" />
                </Grid>
            </GroupBox>
            <Button Content="Refresh Chart!" Grid.Row="2" Margin="5" Click="btnRefreshChartOnClick" />
        </Grid>
    </Grid>
</Window>
